package com.hsmw.schedule.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hsmw.common.base.BaseService;
import com.hsmw.domain.*;
import com.hsmw.schedule.mapper.HsmwHtnUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class HsmwHtnUserService extends BaseService<HsmwHtnUserMapper, HsmwHtnUser> {


    @Autowired
    private HsmwHtnUserMapper hsmwHtnUserMapper;


    /**
     * 根据ID查询
     *
     * @param id
     * @return
     */
    public HsmwHtnUser getHsmwUserById(String id) {
        LambdaQueryWrapper<HsmwHtnUser> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(HsmwUser::getId, id);
        return hsmwHtnUserMapper.selectOne(queryWrapper);
    }



}
